package lesson04;

public class TestMain2 {
    public static void main(String[] args) {
//        abkkcdkkefkkskk
        String str = "abkkcdkkefkkskk";
        while (str.length() != 0) {
            int count = 1;
            for (int i = 1;i < str.length(); i++) {
                if (str.charAt(0) == str.charAt(i)) {
                    count++;
                }
            }
            System.out.println(str.charAt(0) + "@" + count);
            str = str.replace(str.charAt(0) + "", "");
        }

    }

}
